package com.itheima.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
@Controller
@RequestMapping("/param")
public class BasicTypeController {
    @RequestMapping("test01")
    public String test01(HttpServletRequest request){
        //获取请求携带的参数
        String username = request.getParameter("username");
        String password = request.getParameter("password");
        System.out.println("username = " + username);
        System.out.println("password = " + password);
        return "success4";
    }
    @RequestMapping("/test02")
    public String test02(String username,String password){
        System.out.println(username);
        System.out.println(password);
        return "success4";
    }
}
